package ar.edu.unq.wannaplay.panels.client;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;

import ar.edu.unq.wannaplay.dtos.ClientDTO;

public class SingleClientViewPanel extends Panel {

    private static final long serialVersionUID = 1L;

    private ClientDTO modelObject;

    public SingleClientViewPanel(final String id, final ClientDTO modelObject) {
        super(id);
        this.setModelObject(modelObject);
        this.initialize();
    }

    private void initialize() {

        this.add(new Label("name", this.getModelObject().getName()));
        this.add(new Label("email", this.getModelObject().getEmail()));
        this.add(new Label("address", this.getModelObject().getAddress()));
        this.add(new Label("town", this.getModelObject().getTown()));
    }

    public void setModelObject(final ClientDTO modelObject) {
        this.modelObject = modelObject;
    }

    public ClientDTO getModelObject() {
        return modelObject;
    }

}
